import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

import path from "path"

//unocss 安装插件
import UnoCSS from 'unocss/vite'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(),
  UnoCSS(
    {
      configFile: './uno.config.ts'
    }
  )],
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "./src")
    }
  },
  css: {
    preprocessorOptions: {
      scss: {
        // 两种方式都可以
        additionalData: '@import "@/css/main.scss";'
        // additionalData: '@use "@/assets/scss/global.scss" as *;'
      }
    }
  }
})
